package cn.smile.bean.form.core.user;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

/**
 * @author smile-jt
 */
@Data
public class RegistUserForm {

    /**
     * 登录ID
     */
    private String loginId;

    /**
     * 登录账号
     */
    @NotBlank(message = "请输入手机号")
    @Pattern(regexp = "^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$", message = "登陆号格式有误")
    private String phone;

    /**
     * 昵称
     */
    @Length(max = 50, message = "昵称必须0-50个字符")
    private String nickName;

    /**
     * 密码
     */
    @NotBlank(message = "请输入登录密码")
    @Length(min = 8, max = 20, message = "登录密码必须8-20个字符")
    private String password;

    /**
     * 性别(性别 0-未知, 1-男, 2-女)
     */
    private Integer gender;

    /**
     * 电子邮件
     */
    private String email;

    /**
     * 店铺码(不填将初始化店铺)
     */
    private String shopCode;
}
